import { getModule, Module, Mutation, VuexModule } from "vuex-module-decorators";
import store from "/@/store";

@Module({name: 'RouterManager', namespaced: true, dynamic: true, store})
class RouterManager extends VuexModule{
  private isDynamicAddedRouteState: boolean = false;

  get getIsDynamicAddedRouteState() {
    return this.isDynamicAddedRouteState;
  }

  @Mutation
  commitDynamicAddedRouteState(add: boolean){
    this.isDynamicAddedRouteState = add;
  }

  @Mutation
  commitResetState(): void {
    this.isDynamicAddedRouteState = false;
  }
}


export const routerStore =getModule<RouterManager>(RouterManager);
